@charset "UTF-8";
//-----------------------------------------------------  
// reset 页面初始化
// 包括normalize，清零重置，打印样式三大部分
//-----------------------------------------------------
html {
  font-family: $ff; // 设置默认字体
  -ms-text-size-adjust: 100%; // 禁止IOS字体放大
  -webkit-text-size-adjust: 100%; // 禁止IOS字体放大
  overflow-y: scroll;
  -webkit-overflow-scrolling: touch;
}
body {
  margin: 0;
  font-size: $fz;
  line-height: $lh;
  color: $z-c;
  background-color: $by-bg;
}
//link的默认样式
a {
  background: transparent;
  &:active,
  &:hover {
    outline: 0;
  }
  text-decoration: none;
  @if length($a-c) > 1 {
    color: nth($a-c, 1);
    &:hover {
      color: nth($a-c, 2);
    }
  } @else {
    color: $a-c;
    &:hover {
      color: darken($a-c, 10%);
    }
  }
}
//判断是否用简单全局
@if $all-small
{
  form,img,ul,ol,li,dl,dt,dd,form,td,th {
    padding: 0;
    margin: 0;
  }
  li {
    list-style-type: none;
  }
  img {
    vertical-align: middle;
    border: none;
  }
  button,
  input,
  select,
  textarea {
    font-family: $ff;
    color: inherit;
    margin: 0;
    //-webkit-appearance: none;
  }
  input{
    line-height:normal;
  }
  button,
  html input[type="button"],
  input[type="reset"],
  input[type="submit"] {
    //-webkit-appearance: button;
    cursor: pointer;
    @if $lte7 {
      *overflow: visible;
    }
  }
  button[disabled],
  html input[disabled] {
    cursor: default;
  }
  button::-moz-focus-inner,
  input::-moz-focus-inner {
    border: 0;
    padding: 0;
  }
}
@else
//完整的全局定义
{
  //默认文字样式定义
  abbr[title] {
    border-bottom: 1px dotted;
  }
  b,
  strong {
    font-weight: bold;
  }
  dfn {
    font-style: italic;
  }
  mark {
    background: #ff0;
    color: #000;
  }
  small {
    font-size: 80%;
  }
  sub,
  sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
  }
  sup {
    top: -0.5em;
  }
  sub {
    bottom: -0.25em;
  }
  pre {
    overflow: auto;
    white-space: pre;
    white-space: pre-wrap;
    word-wrap: break-word;
  }
  code,
  kbd,
  pre,
  samp {
    font-family: $ff;
    @if $lte7 {
      _font-family: 'courier new', monospace;
    }
    font-size: 1em;
  }
  //默认img样式定义
  img {
    border: 0;
    vertical-align: middle;
    @if $lte7 {
      -ms-interpolation-mode: bicubic; //提高图片在IE7中的质量
    }
  }
  //默认hr样式定义
  hr {
    -moz-box-sizing: content-box;
    box-sizing: content-box;
    height: 0;
  }

  //form元素样式定义
  button,
  input,
  optgroup,
  select,
  textarea {
    color: inherit;
    font: inherit;
    margin: 0;
    //-webkit-appearance: none;
  }
  button {
    overflow: visible;
  }
  button,
  select {
    text-transform: none;
  }
  button,
  html input[type="button"],
  input[type="reset"],
  input[type="submit"] {
    -webkit-appearance: button;
    cursor: pointer;
    @if $lte7 {
      *overflow: visible;
    }
  }
  button[disabled],
  html input[disabled] {
    cursor: default;
  }
  button::-moz-focus-inner,
  input::-moz-focus-inner {
    border: 0;
    padding: 0;
  }
  input {
    line-height: normal;
  }
  input[type="checkbox"],
  input[type="radio"] {
    box-sizing: border-box;
    padding: 0;

    @if $lte7 {
      *height: 13px;
      *width: 13px;
    }
  }
  input[type="number"]::-webkit-inner-spin-button,
  input[type="number"]::-webkit-outer-spin-button {
    height: auto;
  }
  input[type="search"] {
    -webkit-appearance: textfield;
    -moz-box-sizing: content-box;
    -webkit-box-sizing: content-box;
    box-sizing: content-box;
  }
  input[type="search"]::-webkit-search-cancel-button,
  input[type="search"]::-webkit-search-decoration {
    //-webkit-appearance: none;
  }
  fieldset {
    border: 1px solid #c0c0c0;
    margin: 0 2px;
    padding: 0.35em 0.625em 0.75em;
  }
  legend {
    border: 0;
    padding: 0;

    @if $lte7 {
      *margin-left: -7px;
    }
  }
  textarea {
    overflow: auto;
    resize: vertical;
  }
  optgroup {
    font-weight: bold;
  }
  //table样式定义
  table {
    border-collapse: collapse;
    border-spacing: 0;
  }
  td,
  th {
    padding: 0;
  }
  @if $lte7 {
    q {
      quotes: none;
    }
  }
  html,
  button,
  input,
  select,
  textarea {
    font-family: $ff;
  }
  h1, h2, h3, h4, h5, h6, p, figure, form, blockquote {
    margin: 0;
  }
  // ul ol dl
  ul, ol, li, dl, dd {
    margin: 0;
    padding: 0;
  }
  ul, ol {
    list-style: none outside none;
  }
  h1, h2, h3 {
    line-height: 2;
    font-weight: normal;
  }
  h1 {
    font-size: $fz * 1.5;
  }
  h2 {
    font-size: $fz * 1.3;
  }
  h3 {
    font-size: $fz * 1.17;
  }
  h4 {
    font-size: $fz;
  }
  h5, h6 {
    font-size: $fz * 0.85;
    text-transform: uppercase;
  }

}
// 表单placeholder样式
// 注意不可联合申明，否则无效
@if nth($inp-p, 1) {
  // Firefox 4-18
  input:-moz-placeholder,
  textarea:-moz-placeholder {
    color: nth($inp-p, 2);
  }
  // Firefox 19+
  input::-moz-placeholder,
  textarea::-moz-placeholder {
    color: nth($inp-p, 2);
  }
  // Internet Explorer 10+
  input:-ms-input-placeholder,
  textarea:-ms-input-placeholder {
    color: nth($inp-p, 2);
  }
  // Safari and Chrome
  input::-webkit-input-placeholder,
  textarea::-webkit-input-placeholder {
    color: nth($inp-p, 2);
  }
}

//其他兼容性,待完善
@if $other-on {
  /**
 * Address `[hidden]` styling not present in IE 8/9/10.
 * Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22.
 */
  [hidden],
  template {
    display: none;
  }
  /**
   * Correct overflow not hidden in IE 9/10/11.
   */
  svg:not(:root) {
    overflow: hidden;
  }
}

//解决视频绘画等动态元素的兼容性
@if $vidia-on {
  audio,
  canvas,
  progress,
  video {
    display: inline-block;
    vertical-align: baseline;

    @if $lte7 {
      *display: inline;
      *zoom: 1;
    }
  }

  /**
 * Prevent modern browsers from displaying `audio` without controls.
 * Remove excess height in iOS 5 devices.
 */
  audio:not([controls]) {
    display: none;
    height: 0;
  }
}
